package com.wyh.domain.vo.gfive.treeVo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Api("用于生成树的项目VO")
@TableName("project")
public class ProjectVO {
    @ApiModelProperty("主键")
    @TableId(type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("项目名称")
    @NotBlank(message = "项目名称不能为空或者空字符串")
    @Size(max = 255,message = "项目名字不能超过255")
    private String name;

    @ApiModelProperty("上级组织id")
    @NotNull(message = "项目上级id不能为空")
    @TableField("superiorid")
    private Integer superiorId;

    @ApiModelProperty("1为楼盘，2为园区")
    @NotNull(message = "项目类型不能为空")
    private Integer type;

    @ApiModelProperty("关联资源情况，Y是关联到组织表，N是关联到本表")
    @TableField("isconnected")
    private String isConnected;


    @ApiModelProperty("是否启用，1启用，0停用")
    @NotNull(message = "状态不能为空")
    @TableField("state")
    private Integer state;
}
